#include "gtkicontheme.h"
#include "gtkiconthemeprivate.h"
#include "gdkpixbufutilsprivate.h"
+#include "gtkdebug.h"
+
static void gtk_builder_finalize (GObject *object);
static void gtk_builder_set_property (GObject *object,
g_free (priv->filename);
g_free (priv->resource_prefix);
+#ifdef G_ENABLE_DEBUG
+ if (GTK_DEBUG_CHECK (BUILDER_OBJECTS))
+ {
+ GHashTableIter iter;
+ gpointer key, value;
+
+ g_hash_table_iter_init (&iter, priv->objects);
+ while (g_hash_table_iter_next (&iter, &key, &value))
+ {
+ if (G_OBJECT (value)->ref_count == 1)
+ g_message ("builder: %s with id %s unused",
+ G_OBJECT_TYPE_NAME (value), (const char *)key);
+ }
+ }
+#endif
+
g_hash_table_destroy (priv->objects);
g_slist_free_full (priv->signals, (GDestroyNotify)_free_signal_info);
GTK_DEBUG_LAYOUT = 1 << 15,
GTK_DEBUG_SNAPSHOT = 1 << 16,
GTK_DEBUG_CONSTRAINTS = 1 << 17,
+ GTK_DEBUG_BUILDER_OBJECTS = 1 << 18,
} GtkDebugFlag;
#ifdef G_ENABLE_DEBUG
{ "icontheme", GTK_DEBUG_ICONTHEME },
{ "printing", GTK_DEBUG_PRINTING} ,
{ "builder", GTK_DEBUG_BUILDER },
+ { "builder-objects", GTK_DEBUG_BUILDER_OBJECTS },
{ "size-request", GTK_DEBUG_SIZE_REQUEST },
{ "no-css-cache", GTK_DEBUG_NO_CSS_CACHE },
{ "shortcuts", GTK_DEBUG_SHORTCUTS },